package cn.bluethink.eguan.core.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Id;
import javax.persistence.Table;

import cn.bluethink.eguan.model.core.EgBag;

/**
 * 包裹实体模型
 * 
 * @author 苏州中科蓝迪公司所有(c)2016-2021
 * @version 0.2.0
 * @brief 驿馆+（EGUAN）
 * @note 修订历史：
 * 1、wanglei于2018/11/09修订
 */
@Table(name = "eg_bag")
public class EgBagEntity implements Serializable {

    private static final long serialVersionUID = -5281941223325664834L;

    @Id
    private Long bagid;

    // 包裹图标
    private String icon;

    private Date utime;

    public EgBagEntity() {

    }

    public EgBagEntity(Long bagid,String icon) {
        this.bagid = bagid;
        this.icon = icon;
        this.utime = new Date();
    }
    /**
     * 将实体模型装维业务模型
     * 
     * @param entity
     * @return
     */
    public EgBag createEgBag() {
        EgBag bag = new EgBag(bagid,icon);
        bag.setUtime(utime);
        return bag;
    }

    public Long getBagid() {
        return bagid;
    }

    public void setBagid(Long bagid) {
        this.bagid = bagid;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Date getUtime() {
        return utime;
    }

    public void setUtime(Date utime) {
        this.utime = utime;
    }

}
